/*
 * @Author: bankeyu-dell 573569790@qq.com
 * @Date: 2022-10-08 15:53:59
 * @LastEditors: bankeyu-dell 573569790@qq.com
 * @LastEditTime: 2022-10-13 00:59:22
 * @FilePath: \fast-vue3\src\api\rels\index.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { post } from '/@/utils/http/axios';
enum URL {
  addrel = '/msvc/addrel', // 新增好友接口
  agree = '/msvc/agree', // 接收好友接口
  listrels = '/msvc/listrels', // 查询好友列表接口
}

export interface AddrelData {
  customerId: number;
  customerRelId: number;
  random: string;
  timestamp: string;
}

export interface AgreeData {
  customerGroupId: number;
  customerId: number;
  random: string;
  timestamp: string;
  relFlag: string;
  status: string;
}

export interface ListrelsData {
  lableType: string;
  pageNo: number;
  pageSize: number;
}

const addrel = async (data: AddrelData) => post<any>({ url: URL.addrel, data });
const agree = async (data: AgreeData) => post<any>({ url: URL.agree, data });
const listrels = async (data: ListrelsData) => post<any>({ url: URL.listrels, data });
export { addrel, agree, listrels };
